package CI.aufgabe2.cip.mynodes;

import java.util.List;

import CI.aufgabe2.cip.SymbolTable;
import CI.aufgabe2.cip.base.AbstractDescr;

public class MyTermNode extends MyAbstractNode {

	private static final long serialVersionUID = 1L;
	private final List<? extends MyAbstractNode> factorList;

	public MyTermNode(List<? extends MyAbstractNode> fList) {
		factorList = fList;
	}

	@Override
	public void print() {
		trace("FactorNode ");
		if (factorList != null) {
			for (int i = 0; i < factorList.size(); i++) {
				if (factorList.get(i) != null)
					factorList.get(i).print();
			}
		}
		unindent();
	}
	
	
	public AbstractDescr compile(SymbolTable sym) {
		try {
			throw new  IllegalAccessException(this.getClass().getName());
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

}
